//账号
<template>
  <div id="main">
    <el-form
      :label-position="labelPosition"
      label-width="120px"
      :model="formLabelAlign"
    >
      <el-form-item label="头像">
        <el-avatar :src="touXiang"></el-avatar>
      </el-form-item>
      <el-form-item label="姓名">
        <el-input v-model="formLabelAlign.name" style="width: 150px"></el-input>
      </el-form-item>
      <el-form-item label="手机号">
        <el-input
          v-model="formLabelAlign.phone"
          style="width: 150px"
        ></el-input>
      </el-form-item>
      <el-form-item label="身份证号">
        <el-input
          v-model="formLabelAlign.identityCard"
          style="width: 150px"
        ></el-input>
      </el-form-item>
      <el-form-item label="所属部门">
        <el-input
          v-model="formLabelAlign.deptName"
          style="width: 150px"
        ></el-input>
      </el-form-item>
      <el-form-item label="是否部门负责人">
        <el-input v-model="formLabelAlign.name" style="width: 150px"></el-input>
      </el-form-item>
      <el-form-item label="所属岗位">
        <el-input
          v-model="formLabelAlign.postName"
          style="width: 150px"
        ></el-input>
      </el-form-item>
      <el-form-item label="账号">
        <el-input
          v-model="formLabelAlign.account"
          style="width: 150px"
        ></el-input>
      </el-form-item>
      <el-form-item label="密码">
        <el-input
          v-model="formLabelAlign.password"
          style="width: 150px"
        ></el-input>

        <el-button type="text" @click="dialogVisible = true"
          >修改密码</el-button
        >
      </el-form-item>
    </el-form>
    <div id="kua">
<el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <el-form
        :model="ruleForm"
        status-icon
       
        ref="ruleForm"
        label-width="130px"
        class="demo-ruleForm"
      >
        <el-form-item label="新密码" prop="pass">
          <el-input
            type="password"
            v-model="ruleForm.password"
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item label="重新输入新密码" prop="checkPass">
          <el-input
            type="password"
            v-model="ruleForm.checkpass"
            autocomplete="off"
          ></el-input>
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="submitForm">提交</el-button>
          <el-button @click="resetForm">重置</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    </div>
    
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      dialogVisible: false,
      labelPosition: "left",
      formLabelAlign: {
        name: "",
        phone: "",
        postName: "",
        account: "",
        identityCard: "",
        deptName: "",
        passWord: "",
      },
      ruleForm: {
        password: "",
        checkpass: "",
      },
      touXiang: "",
    };
  },
  computed: {},
  watch: {},
  methods: {
    show() {
      let user = JSON.parse(sessionStorage.getItem("employee"));
      let id = user.id;

      this.$axios
        .get("http://47.100.30.12:8080/EmpSetController/selectEmpInfo", {
          parmas: {
            id: id,
          },
        })
        .then((data) => {
          console.log(data.data.data);
          this.formLabelAlign = data.data.data;
          this.touXiang = 'http://47.100.30.12:8080'+ data.data.data.touXiang;
      
          // console.log(this.touXiang);
        });
    },
    handleClose(done) {
      this.$confirm("确认关闭？").then((data) => {
        done();
        console.log(data);
      });
    },
    //重置
    resetForm() {
      this.password = "";
      this.checkpass = "";
    },
    //提交
    submitForm(){

    }
  },
  created() {},
  mounted() {
    this.show();
  },
};
</script>
<style scoped>
#mian {
  margin-left: 60px;
}
#main >>> .el-input__inner {
  border: 0;
}
#kua>>>.el-input__inner{
  border: 1px solid black;
}
</style>